package com.api.shopapi.service.impl;


import com.api.shopapi.entity.CartBusiness;
import com.api.shopapi.mapper.CartBusinessMapper;
import com.api.shopapi.service.CartBusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author maochuan
 */
@Service("CartBusinessServiceImplOne")
public class CartBusinessServiceImpl implements CartBusinessService {

    @Autowired
    private CartBusinessMapper cartBusinessMapper;
    @Override
    public int insert(CartBusiness cartBusiness) {
        return cartBusinessMapper.insert(cartBusiness);
    }

    @Override
    public int update(CartBusiness cartBusiness) {
        return cartBusinessMapper.update(cartBusiness);
    }

    @Override
    public int delete(String cartBusinessCode) {
        return cartBusinessMapper.delete(cartBusinessCode);
    }

    @Override
    public List<CartBusiness> getList() {
        return cartBusinessMapper.getList();
    }

    @Override
    public List<CartBusiness> getListByCartCode(String cartCode){
        return cartBusinessMapper.getListByCartCode(cartCode);
    }

    @Override
    public CartBusiness getByCartBusinessCode(String cartBusinessCode) {
        return cartBusinessMapper.getByCartBusinessCode(cartBusinessCode);
    }

}
